The invention relates generally to the field of computer systems and more particularly to a system and method for reconfiguring storage devices of a computer system into logical units of storage space on one or more on-line disk drives, typically while the system is in real-time operation.
A computer system includes an operating system whose primary function is the management of hardware and software resources in the computer system. The operating system handles input/output (I/O) requests from software processes or applications to exchange data with on-line external storage devices in a storage subsystem. The applications address those storage devices in terms of the names of files, which contain the information to be sent to or retrieved from them. A file system may be present to translate the file names into logical addresses in the storage subsystem. The operating system forwards I/O requests to an I/O subsystem, which, in turn, converts the logical addresses into physical locations in the storage devices and commands the latter devices to engage in the requested storage or retrieval operations.
The on-line storage devices on a computer are configured from one or more disks into logical units of storage space referred to herein as xe2x80x9ccontainers.xe2x80x9d Examples of containers include volume sets, stripe sets, mirror sets, and various Redundant Array of Independent Disk (RAID) implementations. A volume set comprises one or more physical partitions, i.e., collections of blocks of contiguous space on disks, and is composed of space on one or more disks. Data is stored in a volume set by filling all of the volume""s partitions in one disk drive before using volume partitions in another disk drive. A stripe set is a series of partitions on multiple disks, one partition per disk, that is combined into a single logical volume. Data stored in a stripe set is evenly distributed among the disk drives in the stripe set. In its basic configuration, a stripe set is also known as a xe2x80x9cRAID 0xe2x80x9d configuration. A mirror set is composed of volumes on multiple disks, whereby a volume on one disk is a duplicate copy of an equal sized volume on another disk in order to provide data redundancy. A basic configuration for a mirror set is known as xe2x80x9cRAID 1.xe2x80x9d There is often a desire to increase data reliability in a stripe set by using parity distributed across storage blocks with respect to each stripe. Where such parity is provided to the stripe set, the configuration is known as xe2x80x9cRAID 5.xe2x80x9d In an even more complex implementation, where stripe sets are mirrored on a plurality of containersxe2x80x94and redundant data is distributed across the stripes, the resulting configuration is known as xe2x80x9cRAID 10.xe2x80x9d Generally speaking, all configurations of the RAID implementation (RAID 0-10) provide a collection of partitions, where each partition is composed of space from one disk in order to support data redundancy.
According to a prior system, the I/O subsystem configures the containers through a software entity called a xe2x80x9ccontainer manager.xe2x80x9d Essentially the container manager sets up a mapping structure to efficiently map logical addresses received from the file system to physical addresses on storage devices. The I/O subsystem also includes a software driver for each type of container configuration on the system. These drivers use the mapping structure to derive the physical addresses, which they then pass to the prospective storage devices for storage and retrieval operations.
Specifically, when the computer system is initially organized, the I/O subsystem""s container manager configures the containers and maintains the configuration tables in a container layer of the I/O subsystem. In accordance with a co-pending related U.S. patent application Ser. No. 08/964,304, entitled, File Array Storage Architecture by Richard Napolitano et al., now U.S. Pat. No. 6,219,693, the container layer of the I/O subsystem comprises a Device Switch Table, a Container Array, and a Partition Table. The teachings of this application are expressly incorporated herein by reference. The Device Switch table consists of entries, each of which ordinarily points to the entry point of a container driver that performs I/O operations on a particular type of container. The Container Array is a table of entries, each of which ordinarily points to data structures used by a container driver. There is a fixed one-to-one relationship between the Device Switch Table and the Container Array. The Partition Table contains partition structures copied from disk drives for each container on the system. Each Partition Table entry points to one physical disk drive and allows the container driver to access physical location in the on-line storage devices.
When a software process issues an I/O request, the operating system accepts the I/O request and translates it into an I/O request bound for a particular device. The operating system sends the I/O request which includes, inter alia, a block number for the first block of data requested by the application and also a pointer to a Device Switch Table entry which points to a container driver for the container where the requested data is stored. The container driver accesses the Container Array entry for pointers to the data structures used in that container and to Partition Table entries for that container. Based on the information in the data structures, the container driver also accesses Partition Table entries to obtain the starting physical locations of the container on the storage devices. Based on the structures pointed to by the Container Array entry and partition structures in the Partition Table, the container driver sends the I/O request to the appropriate disk drivers for access to the disk drives.
In prior systems, the containers are configured during the initial computer setup and can not be reconfigured during I/O processing without corrupting currently processing I/O requests. As storage needs on a computer system change, the system administrators may need to reconfigure containers to add disks to them or remove disks from them, partition disks drives to form new containers, and/or increase the size of existing containers. If containers are reconfigured during I/O processing in the I/O subsystem, the reconfiguration may corrupt or erase the currently processing I/O requests. However, shutting down the system to reconfigure containers may be unacceptable for businesses that require high availability, i.e., twenty-four hours/seven days a week on-line activity.
One aspect of the system described herein is the routing of I/O requests in the I/O subsystem to a different container than previously pointed to by the operating system. On-line storage devices are configured from on one or more disks into logical units of storage space referred to herein as xe2x80x9ccontainers.xe2x80x9d Containers are created and maintained by a software entity called the xe2x80x9ccontainer manager.xe2x80x9d Each type of container on the system has an associated driver, which processes system requests on that type of container. After a complete backup operation, the backup program verifies the backed up files to make sure that the files on the secondary storage device (usually a tape) were correctly backed up. One problem with the backup process is that files may change during the backup operation.
To avoid backing up files modified during the backup process and to enable applications to access files during the backup operation, the container manager periodically (e.g. once a day) performs a procedure that takes a xe2x80x9csnapshotxe2x80x9d or copy of each read-write container whereby, the container manager creates a read-only container which looks like a copy of the data in the read-write container at a particular instant in time. Thereafter, the container manager performs a xe2x80x9ccopy-on-writexe2x80x9d procedure where an unmodified copy of data in the read-write container is copied to a read-only backup container every time is there is a request to modify data in the read-write container. The container manager uses the copy-on-write method to maintain the snapshot and to enable backup processes to access and back up an unchanging, read-only copy of the on-line data at the instant the snapshot was created. This procedure is described in detail in related co-pending U.S. patent application Ser. No. 08/963,754, entitled Copy-on-Write with Compaction by Chris Franklin, the teachings of which are also expressly incorporated herein by reference.
During the backup procedure, the container manager creates a xe2x80x9csnapshotxe2x80x9d container, a xe2x80x9csnapshottedxe2x80x9d container and a xe2x80x9cbacking storexe2x80x9d container. After the container manager takes the snapshot, the snapshotted container driver processes all input/output (I/O) requests, to store data in or retrieve data from a read-write container. The snapshotted container driver processes all I/O requests to retrieve data from the read-write container by forwarding them directly to the read-write container driver. However for all I/O requests to modify data in a read-write container, the container manager first determines whether the requested block of data has been modified since the time of the snapshot. If the block has not been modified, the container manager copies the data to the backing store container and then sets an associated bit-map flag in a modified-bit-map table. The modified-bit-map table contains a bit-map with each bit representing one block of data in the read-write container. After setting the modified-bit-map flag, the snapshotted container driver forwards the I/O storage request to the read-write container driver.
When the backup process begins execution, it invokes I/O retrieval requests from the snapshot container. In this example, a file system, which is a component of the operating system, translates the file-oriented I/O request into a logical address and forwards the request to a snapshot container driver. The snapshot container driver checks the associated bit-map in the modified-bit-map table for the requested block of data. If the bit-map is set, the snapshot container driver forwards the request to the backing store container driver to retrieve the unmodified copy of that block from the backing store container. The backing store container driver then processes the backup process retrieval request. If the bit-map is not set, this means that the block has not been modified since the snapshot was created. The snapshot container driver forwards the request to the read-write container driver to retrieve a copy of that block of data from the read-write container. Upon retrieving the file from the backing store container or the read-write container, the backup process backs it up. After a complete backup operation, the container manager deletes the snapshotted container, the snapshot container, the backing store container, and the modified-bit-map table, and thereafter, forwards all I/O requests directly to the read-write container driver.
Many computer systems currently employ the popular Windows(copyright) NT operating system, available from Microsoft of Redmond, Wash., as the framework for the running of resident applications and handling files. The particular file system associated with the NT operating system is termed the NT File System, or NTFS. NTFS, in its current version, is designed to work in conjunction with a backup facility generally configured to backup back to the original read-write storage disk. In doing so, it employs a write function to the disk for purposes of, for example marking and/or archive bit handling. Accordingly, there is a significant disadvantage to conventional snapshot arrangements, that generate a read-only snapshot container, when operating in an NT environment. Simply stated, the NTFS will not accept a disk container to which it cannot write (e.g. the read-only snapshot is unacceptable). Rather than performing the desired backup finction, the NTFS, when accessing a read-only snapshot, returns an incompatible disk error message.
There may be other instances, such as in a database, where the ability to write to a snapshot container is also desired. Thus, even where a file system is absent, it is sometimes desirable to provide a write capability to a snapshot.
Accordingly, it is an object of this invention to enable a snapshot backup to be created so that it can operate in conjunction with a system that performs both read and write operations to a disk during backup.
This invention overcomes the disadvantages of the prior art by providing a system and method for enabling a snapshot container generated in a copy-on-write backup process to function in the presence of a file system, or other data handling system (operating in, for example, a database environment), that writes data to the backup disk. The snapshot container, which is read-by and written-to by the file system backup application is configured as a read-write container with associated driver. The write data from the backup application is provided to, and stored in the snapshot information container that also receives and stores data from the original read-write container in the manner of a backing store container. Data in the snapshot information container is selectively mapped (on a storage block-by-storage block basis) to either the original read-write container as a source, or to backup information container as a source, denoting upon a backup application write within the storage block, based upon a bit-map associated with the snapshot driver arrangement. The bit-map designates discrete memory storage block within the container as being mapped to either the original read-write container or as backup write data, denoted as originating within the snapshot information container via the snapshot/backup application. A file system, according to one example, can comprise an NTFS file system.